package org.oschina;

public class Constants {
	
	//是否输出sql
	public final static boolean DB_SHOW_SQL=false;
	
	//是否输出索引条件
	public final static boolean INDEX_SHOW_TERM=false;
	
	//是否使用插件
	public final static boolean PLUGIN_ENABLED=true;
	
	//是否输出插件执行记录
	public final static boolean PLUGIN_EXECUTE_RECORD=false;
	
	//加密密匙
	public final static String ENCRYPT_KEY="oschina";
	
	//数据库表
	public final static String DB_USER="osc_user";  //用户表
	public final static String DB_DONGTAN="osc_dongtan"; //动弹
	public final static String DB_INDEX="`osc_index`"; //索引
	public final static String DB_COMMENT="osc_comment"; //评论
	public final static String DB_USER_ROLE_TYPE="osc_user_role_type"; //用户权限类型
	public final static String DB_USER_ROLE="osc_user_role"; //用户权限
	public final static String DB_MODULE="osc_module"; //模块
	public final static String DB_MODULE_TYPE="osc_module_type"; //模块类型
	public final static String DB_MANAGE_MENU="osc_manage_menu"; //管理菜单
	public final static String DB_CONFIG="osc_config"; //配置
	public final static String DB_USER_BAR="osc_user_bar"; //用户信息条
	public final static String DB_USER_BAR_ROLE="osc_user_bar_role"; //信息条角色
	public final static String DB_USER_MENU="osc_user_menu"; //用户菜单
	public final static String DB_USER_MENU_ROLE="osc_user_menu_role"; //用户菜单角色
	public final static String DB_USER_FOLLOW="osc_user_follow"; //关注
	public final static String DB_USER_ACTIVE="osc_user_active"; //动态
	public final static String DB_USER_ACTIVE_TYPE="osc_user_active_type"; //动态类型
	public final static String DB_USER_MAIL="osc_user_mail"; //用户邮件
	public final static String DB_USER_MAIL_RECORD="osc_user_mail_record"; //用户邮件记录
	public final static String DB_USER_MAIL_TYPE="osc_user_mail_type"; //用户邮件类型
	public final static String DB_USER_LOGIN_RECORD="osc_user_login_record"; //用户登录记录
	public final static String DB_ILLEGAL_CHAR="osc_illegal_char"; //非法字符
	public final static String DB_OPEN_API="osc_open_api"; //api
	public final static String DB_SOFTWARE="osc_software"; //软件
	public final static String DB_DISCUSS="osc_discuss"; //讨论
	public final static String DB_DISCUSS_ORDER="osc_discuss_order"; //讨论排序
	public final static String DB_DISCUSS_FORUM="osc_discuss_forum"; //讨论板块
	public final static String DB_DISUCSS_FORUM_INDEX="osc_discuss_forum_index";
	public final static String DB_UPLOAD_CONFIG="osc_upload_config"; //上传配置
	public final static String DB_UPLOAD_RECORD="osc_upload_record"; //上传记录
	public final static String DB_FRIENDLINK="osc_friendlink"; //友情链接
	public final static String DB_DISCUSS_TAG="osc_discuss_tag"; //讨论区标签
	public final static String DB_BLOG="osc_blog"; //博客
	public final static String DB_BLOG_ORDER="osc_blog_order"; //博客排序
	public final static String DB_BLOG_CATALOG="osc_blog_catalog"; //博客目录
	public final static String DB_BLOG_RECOMMEND="osc_blog_recommend"; //博客自荐
	public final static String DB_FAVORITE="osc_favorite"; //收藏
	public final static String DB_FAVORITE_TYPE="osc_favorite_type"; //收藏类型
	public final static String DB_REPORT="osc_report"; //举报
	public final static String DB_CACHE_NODE="osc_cache_node"; //缓存节点
	
	//缓存KEY
	public final static String CACHE_ONLINE_USER="ONLINE_USER_CACHE";  //在线用户信息
	public final static String CACHE_USER="USER_CACHE"; //用户缓存
	public final static String CACHE_USER_ROLE_TYPE="USER_ROLE_TYPE_CACHE"; //用户权限类型缓存
	public final static String CACHE_USER_ROLE="USER_ROLE_CACHE"; //用户权限缓存
	public final static String CACHE_USER_BAR="USER_BAR_CACHE"; //用户信息条缓存
	public final static String CACHE_USER_BAR_ROLE="USER_BAR_ROLE_CACHE"; //信息条角色缓存
	public final static String CACHE_USER_MENU="USER_MENU_CACHE"; //用户菜单缓存
	public final static String CACHE_USER_MENU_ROLE="USER_MENU_ROLE_CACHE"; //用户菜单角色缓存
	public final static String CACHE_USER_ACTIVE="USER_ACTIVE_CACHE"; //动态缓存
	public final static String CACHE_USER_ACTIVE_BY_AUTHOR="USER_ACITVE_BY_AUTHOR_CACHE"; //根据作者动态缓存
	public final static String CACHE_USER_ACTIVE_BY_AUTHOR_COUNT="USER_ACTIVE_BY_AUTHOR_COUNT_CACHE"; //根据作者动态数量缓存
	public final static String CACHE_USER_ACTIVE_BY_AUTHOR_AND_FOLLOW="USER_ACTIVE_BY_AUTHOR_AND_FOLLOW_CACHE"; //根据作者和关注缓存
	public final static String CACHE_USER_ACTIVE_BY_AUTHOR_AND_FOLLOW_COUNT="USER_ACITVE_BY_AUTHOR_AND_FOLLOW_COUNT_CACHE"; //根据作者和关注数量缓存
	public final static String CACHE_USER_ACTIVE_TYPE="USER_ACTIVE_TYPE_CACHE"; //动态类型
	public final static String CACHE_USER_MAIL="USER_MAIL_CACHE"; //用户邮件缓存
	public final static String CACHE_USER_MAIL_RECORD="USER_MAIL_RECORD_CACHE"; //用户邮件记录缓存
	public final static String CACHE_USER_MAIL_TYPE="USER_MAIL_TYPE_CACHE"; //用户邮件类型缓存
	public final static String CACHE_USER_MAIL_COUNT="USER_MAIL_COUNT_CACHE"; //用户邮件数量缓存
	public final static String CACHE_USER_MAIL_UNREAD_COUNT="USER_MAIL_UNREAD_CACHE"; //用户未读邮件数量缓存
	public final static String CACHE_USER_LOGIN_RECORD="USER_LOGIN_RECORD_CACHE"; //用户登录记录缓存
	public final static String CACHE_MODULE="MODULE_CACHE"; //模块缓存
	public final static String CACHE_MODULE_TYPE="MODULE_TYPE_CACHE"; //模块类型缓存
	public final static String CACHE_INDEX="INDEX_CACHE"; //索引缓存
	public final static String CACHE_INDEX_MAJOR_UPDATE="INDEX_MAJOR_UPDATE_CACHE"; //索引更新缓存
	public final static String CACHE_DONGTAN="DONGTAN_CACHE"; //动弹
	public final static String CACHE_DONGTAN_LIST="DONGTAN_LIST_CACHE"; //动弹列表缓存
	public final static String CACHE_COMMENT="COMMENT_CACHE"; //评论缓存
	public final static String CACHE_COMMENT_NEED="COMMENT_NEED_CACHE"; //需要缓存的评论
	public final static String CACHE_COMMENT_COUNT="COMMENT_COUNT_CACHE"; //评论数量缓存
	public final static String CACHE_COMMENT_FLOOR="COMMENT_FLOOR_CACHE"; //评论层数缓存
	public final static String CACHE_COMMENT_LIST="COMMENT_LIST_CACHE_MAJOR"; //评论缓存列表
	public final static String CACHE_COMMENT_QUOTE_LIST="COMMENT_QUOTE_LIST_CACHE"; //评论引用缓存
	public final static String CACHE_MANAGE_MENU="MANAGE_MENU_CACHE"; //管理菜单缓存
	public final static String CACHE_CONFIG="CONFIG_CACHE"; //配置缓存
	public final static String CACHE_ILLEGAL_CHAR="ILLEGAL_CHAR_CACHE"; //非法字符缓存
	public final static String CACHE_OPEN_API="OPEN_API_CACHE"; //api缓存
	public final static String CACHE_SOFTWARE="SOFTWARE_CACHE"; //软件缓存
	public final static String CACHE_DISCUSS="DISCUSS_CACHE"; //讨论缓存
	public final static String CACHE_DISCUSS_RELATED="DISCUSS_RELATED_CACHE"; //相关讨论缓存 
	public final static String CACHE_DISCUSS_ORDER="DISCUSS_ORDER_CACHE"; //讨论顺序缓存
	public final static String CACHE_DISCUSS_FORUM="DISCUSS_FORUM_CACHE"; //讨论板块缓存
	public final static String CACHE_DISCUSS_FORUM_INDEX="DISCUSS_FORUM_INDEX_CACHE";
	public final static String CACHE_DISCUSS_INDEX="DISCUSS_INDEX_CACHE"; //讨论首页缓存
	public final static String CACHE_UPLOAD_CONFIG="UPLOAD_CONFIG_CACHE"; //上传配置缓存
	public final static String CACHE_FRIENDLINK="FRIENDLINK_CACHE"; //友情链接缓存
	public final static String CACHE_DISCUSS_TAG="DISCUSS_TAG_CACHE"; //讨论区标签缓存
	public final static String CACHE_DISCUSS_BY_TAG="DISCUSS_BY_TAG_CACHE"; //根据标签缓存
	public final static String CACHE_USER_FOLLOW="USER_FOLLOW_CACHE"; //关注缓存
	public final static String CACHE_BLOG="BLOG_CACHE"; //博客缓存
	public final static String CACHE_BLOG_RELATED="BLOG_RELATED_CACHE"; //相关博客缓存
	public final static String CACHE_BLOG_ORDER="BLOG_ORDER_CACHE"; //博客排序缓存
	public final static String CACHE_BLOG_CATALOG="BLOG_CATALOG_CACHE"; //博客目录缓存
	public final static String CACHE_BLOG_COUNT_BY_TYPE_CATALOG_AUTHOR="BLOG_COUNT_BY_TYPE_CATALOG_AUTHOR_CACHE"; //数量_类型目录作者缓存
	public final static String CACHE_BLOG_BY_TYPE_CATALOG_AUTHOR="BLOG_BY_TYPE_CATALOG_AUTHOR_CACHE"; //博客_类型目录作者缓存
	public final static String CACHE_BLOG_CATALOG_BY_AUTHOR="BLOG_CATALOG_BY_AUTHOR_CACHE"; //博客目录_作者缓存
	public final static String CACHE_FAVORITE="FAVORITE_CACHE"; //收藏缓存
	public final static String CACHE_FAVORITE_BY_USER_AND_TYPE="FAVORITE_BY_USER_TYPE_CACHE"; //根据用户和类型收藏缓存
	public final static String CACHE_FAVORITE_COUNT_BY_USER_AND_TYPE="FAVORITE_COUNT_BY_USER_TYPE_CACHE"; //根据用户和类型数量缓存
	public final static String CACHE_FAVORITE_TYPE="FAVORITE_TYPE_CACHE"; //收藏类型缓存
	public final static String CACHE_BATCH_UPDATE="BATCH_UPDATE_CACHE"; //批量更新缓存
	public final static String CACHE_CACHE_NODE="CACHE_NODE_CACHE"; //缓存节点缓存
	
	//缓存超时时间  单位:秒
	public final static long TIMEOUT_USER_TOKEN=1000*60*60*24*30L; //令牌过期时间 (毫秒)
	public final static int TIMEOUT_ONLINE_USER=-1; //在线用户数据过期时间
	public final static int TIMEOUT_USER=60*10; //用户过期时间
	public final static int TIMEOUT_USER_ROLE_TYPE=-1; //用户角色类型过期时间
	public final static int TIMEOUT_USER_ROLE=-1; //用户角色过期时间
	public final static int TIMEOUT_USER_BAR=-1; //用户信息条过期时间
	public final static int TIMEOUT_USER_BAR_ROLE=-1; //用户信息条权限过期时间
	public final static int TIMEOUT_USER_MENU=-1; //用户菜单过期时间
	public final static int TIMEOUT_USER_MENU_ROLE=-1; //用户菜单角色过期时间
	public final static int TIMEOUT_USER_FOLLOW=60*10; //关注过期时间
	public final static int TIMEOUT_USER_ACTIVE=60*10; //动态过期时间
	public final static int TIMEOUT_USER_ACTIVE_TYPE=-1; //动态过期时间
	public final static int TIMEOUT_USER_MAIL=-1; //用户邮件过期时间
	public final static int TIMEOUT_USER_MAIL_TYPE=-1; //用户邮件类型过期时间
	public final static int TIMEOUT_USER_MAIL_RECORD=-1; //用户邮件记录过期时间
	public final static int TIMEOUT_USER_MAIL_COUNT=-1; //用户邮件数量过期时间
	public final static int TIMEOUT_USER_LOGIN_RECORD=-1; //用户登录记录过期时间
	public final static int TIMEOUT_MODULE=-1; //模块过期时间
	public final static int TIMEOUT_MODULE_TYPE=-1; //模块类型过期时间
	public final static int TIMEOUT_INDEX=-1; //索引过期时间
	public final static int TIMEOUT_DONGTAN=60*10; //动弹过期时间
	public final static int TIMEOUT_COMMENT=60*2; //评论过期时间
	public final static int TIMEOUT_MANAGE_MENU=-1; //管理菜单过期时间
	public final static int TIMEOUT_CONFIG=-1; //配置过期时间
	public final static int TIMEOUT_ILLEGAL_CHAR=-1; //非法字符串过期时间
	public final static int TIMEOUT_OPEN_API=-1; //开放API过期时间
	public final static int TIMEOUT_SOFTWARE=60*10; //软件过期时间
	public final static int TIMEOUT_DISCUSS=60*1; //讨论过期时间
	public final static int TIMEOUT_DISCUSS_RELATED=60*1; //相关讨论过期时间
	public final static int TIMEOUT_DISCUSS_ORDER=-1; //讨论排序过期时间
	public final static int TIMEOUT_DISCUSS_FORUM=-1; //讨论板块过期时间
	public final static int TIMEOUT_DISCUSS_VIEWS_COUNT=-1; //讨论浏览量过期时间
	public final static int TIMEOUT_DISCUSS_FORUM_INDEX=-1;
	public final static int TIMEOUT_DISCUSS_INDEX=60*1; //讨论首页过期时间
	public final static int TIMEOUT_UPLOAD_CONFIG=-1; //上传配置过期时间
	public final static int TIMEOUT_FRIENDLINK=-1; //友情链接过期时间
	public final static int TIMEOUT_DISCUSS_TAG=60*10; //讨论区标签过期时间
	public final static int TIMEOUT_BLOG=60*10; //博客过期时间
	public final static int TIMEOUT_BLOG_RELATED=60*10; //相关博客过期时间
	public final static int TIMEOUT_BLOG_ORDER=-1; //博客排序过期时间
	public final static int TIMEOUT_BLOG_CATALOG=60*10; //博客目录过期时间
	public final static int TIMEOUT_FAVORITE=60*10; //收藏过期时间
	public final static int TIMEOUT_FAVORITE_TYPE=-1; //收藏类型过期时间
	public final static int TIMEOUT_BATCH_UPDATE=-1; //批量更新过期时间
	public final static int TIMEOUT_CACHE_NODE=-1; //缓存节点过期时间
	
	
	//缓存最大数量
	public final static int MAX_CACHE_DONGTAN=100; //动弹最多缓存数量
	public final static int MAX_CACHE_COMMENT=-1; //评论最多缓存数量
	public final static int MAX_CACHE_USER_MAIL=-1; //邮件最多缓存数量
	public final static int MAX_CACHE_BLOG=100; //博客最多缓存数量
	public final static int MAX_CACHE_USER_ACITVE_BY_AUTHOR=100; //根据作者动态最多缓存数量
	public final static int MAX_CACHE_USER_ACTIVE_BY_AUTHOR_AND_FOLLOW=100; //根据作者和关注动态最多缓存数量
	public final static int MAX_CACHE_FAVORITE_BY_USER_AND_TYPE=-1; //根据用户和类型最多缓存数量
	
	public final static int REFRESH_ONLINE_USER=1000*60*5; //刷新在线用户时间 毫秒
	public final static int REFRESH_ONLINE_USER_SECURITY=1000*30; //刷新在线用户时间_验证 毫秒
	
	//索引
	public final static int INDEX_COMMENT_LIST=1; //评论ID索引
	public final static int INDEX_DONGTAN=2; //动弹索引
	public final static int INDEX_COMMENT=3; //评论索引
	public final static int INDEX_USER=4; //用户索引
	public final static int INDEX_USER_ROLE_TYPE=5; //用户权限类型索引
	public final static int INDEX_USER_ROLE=6; //用户权限索引
	public final static int INDEX_USER_BAR=7; //用户信息条索引
	public final static int INDEX_USER_BAR_ROLE=8; //用户信息条角色索引
	public final static int INDEX_ILLEGAL_CHAR=9; //非法字符索引 
	public final static int INDEX_OPEN_API=10; //api索引
	public final static int INDEX_SOFTWARE=11; //软件索引
	public final static int INDEX_DISCUSS=12; //讨论索引
	public final static int INDEX_DISCUSS_ORDER=13; //讨论排序
	public final static int INDEX_DISCUSS_FORUM=14; //讨论板块
	public final static int INDEX_UPLOAD_RECORD=15; //上传记录索引
	public final static int INDEX_FRIENDLINK=16; //友情链接索引
	public final static int INDEX_DISCUSS_TAG=17; //讨论区标签索引
	public final static int INDEX_USER_FOLLOW=18; //关注索引
	public final static int INDEX_BLOG=19; //博客索引
	public final static int INDEX_BLOG_ORDER=20; //博客排序索引
	public final static int INDEX_BLOG_CATALOG=21; //博客类别索引
	public final static int INDEX_USER_MENU=22; //用户菜单索引
	public final static int INDEX_USER_MENU_ROLE=23; //用户菜单角色索引
	public final static int INDEX_USER_ACTIVE=24; //动态索引
	public final static int INDEX_USER_MAIL=25; //用户邮件索引
	public final static int INDEX_USER_MAIL_RECORD=26; //用户邮件记录索引
	public final static int INDEX_FAVORITE=27; //收藏索引
	public final static int INDEX_REPORT=28; //举报索引
	public final static int INDEX_USER_LOGIN_RECORD=29; //用户登录记录索引
	public final static int INDEX_CACHE_NODE=30; //缓存节点索引
	public final static int INDEX_BLOG_RECOMMEND=31; //博客自荐索引
	
	//消息队列
	public final static int QUEUE_TIMEOUT=-1; //消息队列过期时间
	public final static String QUEUE_BATCH_UPDATE="BATCH_UPDATE_QUEUE"; //批量更新
	public final static String QUEUE_INDEX_MAJOR_UPDATE="INDEX_UPDATE_MAJOR_QUEUE"; //索引更新
	public final static String QUEUE_USER_MAIL_PUSH="USER_MAIL_PUSH_QUEUE"; //邮件推送
	public final static String QUEUE_USER_SIMPLE_MAIL_PUSH="USER_SIMPLE_MAIL_PUSH_QUEUE"; //普通邮件推送
	public final static String QUEUE_USER_SYSTEM_MAIL_PUSH="USER_SYSTEM_MAIL_PUSH_QUEUE"; //系统邮件推送
	public final static String QUEUE_USER_STATUS_REFRESH="USER_STATUS_REFRESH_QUEUE"; //用户状态刷新
	public final static String QUEUE_USER_LOGOUT_HANDLE="USER_LOGOUT_HANDLE_QUEUE"; //用户下线处理
	public final static String QUEUE_INDEX_HANDLE="INDEX_HANDLE_QUEUE"; //索引操作
	public final static String QUEUE_EMAIL_SEND_QUEUE="EMAIL_SEND_QUEUE"; //邮件发送
	public final static String QUEUE_USER_ACTIVE_PUSH="USER_ACTIVE_PUSH_QUEUE"; //用户动态推送
	
	//订阅
	public final static String TOPIC_CACHE_NODE_SYNC="CACHE_NODE_SYNC_TOPIC"; //缓存节点同步
	public final static String TOPIC_PLUGIN_CREATE_SYNC="PLUGIN_CREATE_SYNC_TOPIC"; //创建插件同步
	public final static String TOPIC_PLUGIN_REMOVE_SYNC="PLUGIN_REMOVE_SYNC_TOPIC"; //移除插件同步
	public final static String TOPIC_PLUGIN_STATUS_SYNC="PLUGIN_STATUS_SYNC_TOPIC"; //插件状态同步
	
	//锁
	public final static String LOCK_INDEX_FIND="INDEX_FIND_LOCK"; //查找索引锁
	
	//索引路径
	public final static String INDEX_PATH_BLOG="/blog"; //博客索引路径
	public final static String INDEX_PATH_DISCUSS="/discuss"; //讨论索引路径
	public final static String INDEX_PATH_SOFTWARE="/software"; //软件索引路径
	
	//线程变量
	public final static String THREAD_VARIABLE_IP="IP";
	public final static String THREAD_VARIABLE_TOKEN="TOKEN";
	public final static String THREAD_VARIABLE_AUTHENTICATION="AUTHENTICATION";
}